#define  _SHELL_EVE_GLOBAL_
#include "config.h"

#define U_ID_ADD 0x1FFFF7E8
#define U_ID_LEN 12
void shellEve(void)
{
	U8 *pUID;
	U32 shellEncode[4];
	U8 i;


	for (i = 0;i < 4;i++)
	{
		shellEncode[i] = 0;
	}

	printf("\r\n im shellEve Read");

	pUID = (U8 *)U_ID_ADD;
	for (i = 0;i < U_ID_LEN;i++)
	{
		shellEncode[i%4] <<= 8;
		shellEncode[i%4] += *pUID;
		pUID++;
	}

	printf("\r\n im shellEve Calc");

	for (i = 0;i < 4;i++)
	{
		if (i)
		{
			shellEncode[i] = (shellEncode[i]+shellEncode[i-1])*84236066 + 1;
		}
		else
		{
			shellEncode[i] = (shellEncode[i]+shellEncode[3])*84236066 + 1;
		}
	}

	printf("\r\n im shellEve Write");

	writeDataForUID(shellEncode,4);
}

